]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Add compatibility with GTK+ 2.18
authorFlorian Müllner <fmuellner@src.gnome.org>
Mon, 10 May 2010 15:57:05 +0000 (17:57 +0200)
committerFlorian Müllner <fmuellner@src.gnome.org>
Mon, 10 May 2010 16:31:51 +0000 (18:31 +0200)
To replace all calls to deprecated code, GTK+ 2.20 is required - add
some basic compatibility code, so that is still possible to build the
shell with GTK+ 2.18 when not using -DGSEAL_ENABLE.

https://bugzilla.gnome.org/show_bug.cgi?id=618258

configure.ac
src/Makefile-tray.am
src/Makefile.am
src/gtk-compat.h [new file with mode: 0644]
src/shell-embedded-window.c
src/shell-gtk-embed.c
src/tray/na-tray-child.c
src/tray/na-tray-manager.c

index 2dc651edd1ed6eea0b45b0b2ae9d02ebc40262f7..ef833dd2432795e1a9daa2cc4625c4209e4d823a 100644 (file)
@@ -59,7 +59,7 @@ CLUTTER_MIN_VERSION=1.2.0
 GOBJECT_INTROSPECTION_MIN_VERSION=0.6.9
 GJS_MIN_VERSION=0.6
 MUTTER_MIN_VERSION=2.29.1
-GTK_MIN_VERSION=2.20.0
+GTK_MIN_VERSION=2.18.0
 
 # Collect more than 20 libraries for a prize!
 PKG_CHECK_MODULES(MUTTER_PLUGIN, gio-unix-2.0 dbus-glib-1
index 86e41cc929325d90a7f48d4969518019acdc5b81..64e397f0734efb8e5d25c88d60c7ced05c2933af 100644 (file)
@@ -15,6 +15,7 @@ TRAY_STAMP_FILES = stamp-na-marshal.h
 
 # please, keep this sorted alphabetically
 tray_source =                  \
+       gtk-compat.h            \
        tray/na-tray-child.c    \
        tray/na-tray-child.h    \
        tray/na-tray-manager.c  \
index a78d10ef738c3757e630726bebcfb78440e38878..7fc7a56a9d7e068dd54cb1fd92982bda49e08c77 100644 (file)
@@ -82,6 +82,7 @@ libgnome_shell_la_SOURCES =           \
        $(shell_built_sources)          \
        $(shell_public_headers_h)       \
        gnome-shell-plugin.c            \
+       gtk-compat.h                    \
        shell-app.c                     \
        shell-app-private.h             \
        shell-app-system.c              \
diff --git a/src/gtk-compat.h b/src/gtk-compat.h
new file mode 100644 (file)
index 0000000..9515205
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef __GTK_COMPAT_H__
+#define __GTK_COMPAT_H__
+
+#include <gtk/gtk.h>
+
+/* Provide a compatibility layer for accessor functions introduced
+ * in GTK+ 2.20 which we need to build with GSEAL_ENABLE.
+ * That way it is still possible to build with GTK+ 2.18 when not
+ * using GSEAL_ENABLE
+ */
+
+#if !GTK_CHECK_VERSION(2, 20, 0)
+
+#define gtk_widget_get_realized(w) GTK_WIDGET_REALIZED (w)
+#define gtk_widget_get_mapped(w)   GTK_WIDGET_MAPPED (w)
+
+#endif /* GTK_CHECK_VERSION(2, 20, 0) */
+
+#endif /* __GTK_COMPAT_H__ */
index 1f11780e7cc2a462913039df6ffbaedfc0ca8ec6..ce084fb727573c1338ea75254d3bc70a192acbf0 100644 (file)
@@ -6,6 +6,7 @@
 #include <clutter/x11/clutter-x11.h>
 
 #include "shell-embedded-window-private.h"
+#include "gtk-compat.h"
 
 /* This type is a subclass of GtkWindow that ties the window to a
  * ShellGtkEmbed; the window is reparented into the stage
index 70573470dfe84626b6bbc9ac10e3c54933caf813..0f763bf3a8b79e9095f000edd19b5b4417691145 100644 (file)
@@ -3,6 +3,7 @@
 #include "config.h"
 
 #include "shell-embedded-window-private.h"
+#include "gtk-compat.h"
 
 #include <clutter/glx/clutter-glx.h>
 #include <clutter/x11/clutter-x11.h>
index 19a307380397b24d74b58cd310362f38c633b791..be0a616a4b9f4276b1a766fe163d193ae8a1c48a 100644 (file)
@@ -23,6 +23,7 @@
 #include <string.h>
 
 #include "na-tray-child.h"
+#include "gtk-compat.h"
 
 #include <glib/gi18n-lib.h>
 #include <gdk/gdk.h>
index cebc7adfd39713b7b33969a3a70b390bb082caf7..4dee409749a87bee65710c4fdc12434d8fcba35b 100644 (file)
@@ -25,6 +25,7 @@
 #include <libintl.h>
 
 #include "na-tray-manager.h"
+#include "gtk-compat.h"
 
 #include <gdkconfig.h>
 #include <glib/gi18n-lib.h>